home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / DiskInit.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  4.2 KB  |  156 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        DiskInit.h
  3.  
  4.      Contains:    Disk Initialization Package ('PACK' 2) Interfaces.
  5.  
  6.      Version:    Technology:    System 8.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DISKINIT__
  18. #define __DISKINIT__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47.  
  48. struct HFSDefaults {
  49.     char                             sigWord[2];                    /* signature word */
  50.     long                             abSize;                        /* allocation block size in bytes */
  51.     long                             clpSize;                    /* clump size in bytes */
  52.     long                             nxFreeFN;                    /* next free file number */
  53.     long                             btClpSize;                    /* B-Tree clump size in bytes */
  54.     short                             rsrv1;                        /* reserved */
  55.     short                             rsrv2;                        /* reserved */
  56.     short                             rsrv3;                        /* reserved */
  57. };
  58. typedef struct HFSDefaults                HFSDefaults;
  59. enum {
  60.     kHFSPlusDefaultsVersion        = 1
  61. };
  62.  
  63.  
  64. struct HFSPlusDefaults {
  65.     UInt16                             version;                    /* version of this structure */
  66.     UInt16                             flags;                        /* currently undefined; pass zero */
  67.     UInt32                             blockSize;                    /* allocation block size in bytes */
  68.     UInt32                             rsrcClumpSize;                /* clump size for resource forks */
  69.     UInt32                             dataClumpSize;                /* clump size for data forks */
  70.     UInt32                             nextFreeFileID;                /* next free file number */
  71.     UInt32                             catalogClumpSize;            /* clump size for catalog B-tree */
  72.     UInt32                             catalogNodeSize;            /* node size for catalog B-tree */
  73.     UInt32                             extentsClumpSize;            /* clump size for extents B-tree */
  74.     UInt32                             extentsNodeSize;            /* node size for extents B-tree */
  75.     UInt32                             attributesClumpSize;        /* clump size for attributes B-tree */
  76.     UInt32                             attributesNodeSize;            /* node size for attributes B-tree */
  77.     UInt32                             allocationClumpSize;        /* clump size for allocation bitmap file */
  78. };
  79. typedef struct HFSPlusDefaults            HFSPlusDefaults;
  80. EXTERN_API( void )
  81. DILoad                            (void)                                                        THREEWORDINLINE(0x7002, 0x3F00, 0xA9E9);
  82.  
  83. EXTERN_API( void )
  84. DIUnload                        (void)                                                        THREEWORDINLINE(0x7004, 0x3F00, 0xA9E9);
  85.  
  86. EXTERN_API( short )
  87. DIBadMount                        (Point                     where,
  88.                                  UInt32                 evtMessage)                            THREEWORDINLINE(0x7000, 0x3F00, 0xA9E9);
  89.  
  90. EXTERN_API( OSErr )
  91. DIFormat                        (short                     drvNum)                                THREEWORDINLINE(0x7006, 0x3F00, 0xA9E9);
  92.  
  93. EXTERN_API( OSErr )
  94. DIVerify                        (short                     drvNum)                                THREEWORDINLINE(0x7008, 0x3F00, 0xA9E9);
  95.  
  96. EXTERN_API( OSErr )
  97. DIZero                            (short                     drvNum,
  98.                                  ConstStr255Param         volName)                            THREEWORDINLINE(0x700A, 0x3F00, 0xA9E9);
  99.  
  100. /*
  101.     DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
  102.     FSM is part of Macintosh PC Exchange and System 7.5.
  103. */
  104. EXTERN_API( OSErr )
  105. DIXFormat                        (short                     drvNum,
  106.                                  Boolean                 fmtFlag,
  107.                                  unsigned long             fmtArg,
  108.                                  unsigned long *        actSize)                            THREEWORDINLINE(0x700C, 0x3F00, 0xA9E9);
  109.  
  110. EXTERN_API( OSErr )
  111. DIXZero                            (short                     drvNum,
  112.                                  ConstStr255Param         volName,
  113.                                  short                     fsid,
  114.                                  short                     mediaStatus,
  115.                                  short                     volTypeSelector,
  116.                                  unsigned long             volSize,
  117.                                  void *                    extendedInfoPtr)                    THREEWORDINLINE(0x700E, 0x3F00, 0xA9E9);
  118.  
  119. EXTERN_API( OSErr )
  120. DIReformat                        (short                     drvNum,
  121.                                  short                     fsid,
  122.                                  ConstStr255Param         volName,
  123.                                  ConstStr255Param         msgText)                            THREEWORDINLINE(0x7010, 0x3F00, 0xA9E9);
  124.  
  125.  
  126. EXTERN_API_C( OSErr )
  127. dibadmount                        (Point *                where,
  128.                                  long                     evtMessage);
  129.  
  130. EXTERN_API_C( OSErr )
  131. dizero                            (short                     drvnum,
  132.                                  const char *            volName);
  133.  
  134.  
  135.  
  136. #if PRAGMA_STRUCT_ALIGN
  137.     #pragma options align=reset
  138. #elif PRAGMA_STRUCT_PACKPUSH
  139.     #pragma pack(pop)
  140. #elif PRAGMA_STRUCT_PACK
  141.     #pragma pack()
  142. #endif
  143.  
  144. #ifdef PRAGMA_IMPORT_OFF
  145. #pragma import off
  146. #elif PRAGMA_IMPORT
  147. #pragma import reset
  148. #endif
  149.  
  150. #ifdef __cplusplus
  151. }
  152. #endif
  153.  
  154. #endif /* __DISKINIT__ */
  155.  
  156.